import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/home/Home'
import ViewShop from '@/pages/viewShop/viewShop'
import RentShop from '@/pages/rentShop/rentShop'
import Release from '@/pages/release/Release'
import My from '@/pages/my/my'
import cityList from '@/pages/cityList/cityList'
import shopDetails from '@/pages/shopDetails/shopDetails'
import rentDetails from '@/pages/rentDetails/rentDetails'
import transfer from '@/pages/transfer/transfer'
import wanted from '@/pages/wanted/wanted'
import help from '@/pages/help/help'
import about from '@/pages/about/about'
import Mrelease from '@/pages/Mrelease/Mrelease'
import Mcollection from '@/pages/Mcollection/Mcollection'
import history from '@/pages/history/history'
import login from '@/pages/login/login'
import zhuanti from '@/pages/zhuanti/zhuanti'
import download from '@/pages/download/download'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
      meta: {
        title: '首页'
      }
    },
    {
      path: '/viewShop',
      name: 'ViewShop',
      component: ViewShop
    },
    {
      path: '/rentShop',
      name: 'RentShop',
      component: RentShop
    },
    {
      path: '/release',
      name: 'Release',
      component: Release
    },
    {
      path: '/my',
      name: 'My',
      component: My
    },
    {
      path: '/cityList',
      name: 'cityList',
      component: cityList
    },
    {
      path: '/shopDetails/:id',
      name: 'shopDetails',
      component: shopDetails
    },
    {
      path: '/rentDetails/:id',
      name: 'rentDetails',
      component: rentDetails
    },
    {
      path: '/transfer/:id',
      name: 'transfer',
      component: transfer,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/wanted/:id',
      name: 'wanted',
      component: wanted,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/help',
      name: 'help',
      component: help
    },
    {
      path: '/about',
      name: 'about',
      component: about
    },
    {
      path: '/Mrelease/:id',
      name: 'Mrelease',
      component: Mrelease,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/Mcollection',
      name: 'Mcollection',
      component: Mcollection,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/history',
      name: 'history',
      component: history,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/zhuanti/:id',
      name: 'zhuanti',
      component: zhuanti
    },
    {
      path: '/download',
      name: 'download',
      component: download
    }
  ]
})
